


@extends('system::admin.Layouts.index')
@section('title', '列表')

@section('self_extend_div')
    @parent

    <style>
        body {
            background: #ffffff;
        }

        .layuimini-main {
            width: 75%;
            float: left;
        }

        .mds_left {
            width: 20%;
            float: left;
            height: 1000px;
        }
    </style>

    <div class="mds_left">

        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
            <legend>公司树状图</legend>
        </fieldset>

        <div id="company" class="demo-tree demo-tree-box" style="width: 100%; height: 300px; overflow: scroll;"></div>

    </div>

@endsection



{{--这里写自己的搜索扩展项--}}
@section('Search_terms')
    @parent

@endsection


{{--编辑自定义--}}
@section('self_currentTableBar')

    <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
    <a style="margin-left: 0px;" class="layui-btn layui-btn-normal layui-btn-xs data-count-invalid invalid" lay-event="invalid">无效</a>

@endsection


{{--扩展js--}}
@section('self_extend_js')
    @parent

    <script>
        layui.use(['tree', 'util'], function () {
            var tree = layui.tree
                , layer = layui.layer
                , util = layui.util;

            //模拟数据
            data = [{
                title: '公司信息根目录'
                , id: 1
                , field: 'name1'
                , checked: true
                , spread: true
                , children: [{
                    title: '陕西拖邦汽车救援服务有限公司'
                    , id: 3
                    , field: 'name11'
                    , href: 'javascritp:void(0)'
                    , spread: true
                }]
            }];

            //开启节点操作图标
            tree.render({
                elem: '#company'
                , data: data
                //, edit: ['add', 'update', 'del'] //操作节点的图标
                , edit: [] //操作节点的图标
                , click: function (obj) {
                    //layer.msg(JSON.stringify(obj.data));
                }
            });

        });
    </script>

@endsection



